﻿#include "stackwindow.h"
StackWindow::StackWindow(QWidget *parent,const Qt::AlignmentFlag &v_alignment,const Qt::AlignmentFlag &h_alignment,const QPoint &pos)
    :QDockWidget(parent)
{
    // 设置 QDockWidget 为浮动状态，实现全屏效果
    //this->setFloating(true);
    // 移除按钮
    this->setFeatures(QDockWidget::NoDockWidgetFeatures);
    // 启用可移动性
    //this->setFeatures(QDockWidget::DockWidgetMovable);

    widget = new QWidget;
    _v_alignmentFlag=v_alignment;
    _h_alignmentFlag=h_alignment;
    this->setWidget(widget);
    this->_dis_x=pos.x();
    this->_dis_y=pos.y();
    //this->setAttribute(Qt::WA_TranslucentBackground);
    //initialize the location
    updateDisplay();
}

StackWindow::~StackWindow()
{

}

void StackWindow::updateDisplay()
{
    this->move(_dis_x,_dis_y);
}
